#pragma once

#include "CWindow/CDialogBase.h"
#include "Common.h"

class CMessageDialog :
    public CDialogBase
{
public:
    CMessageDialog();
    ~CMessageDialog();

    dlg_msg LRESULT OnInitDialog(WPARAM wParam, LPARAM lParam);
    dlg_msg LRESULT OnColor(WPARAM wParam, LPARAM lParam);
    dlg_msg LRESULT OnLanguageChange(WPARAM wParam, LPARAM lParam);
    dlg_msg LRESULT OnClose(WPARAM wParam, LPARAM lParam);
    dlg_msg LRESULT OnIdOk(WORD wNotify, WORD wID, HWND hWnd);
    dlg_msg LRESULT OnIdCancel(WORD wNotify, WORD wID, HWND hWnd);
    dlg_msg LRESULT OnIdYes(WORD wNotify, WORD wID, HWND hWnd);
    dlg_msg LRESULT OnIdNo(WORD wNotify, WORD wID, HWND hWnd);

    INT_PTR DoModal(HWND hParent = nullptr, 
        const _tstring& strMessage = _T(""),
        const _tstring& strCaption = _T(""), 
        DWORD dwStyle = MB_OK
    );

    INT_PTR DoDialog(HWND hParent = nullptr,
        const _tstring& strMessage = _T(""),
        const _tstring& strCaption = _T(""),
        DWORD dwStyle = MB_OK
    );

protected:

    virtual BOOL PreTranslateMessage(LPMSG pMsg);

private:

    DECLARE_DLG_MESSAGE_MAP()

private:

    HBRUSH m_hBrush = NULL;
    _tstring m_strMessage;
    _tstring m_strCaption;
    DWORD m_dwType = 0;
};